Skip to content

Instantly share code, notes, and snippets.

Render 1 Render 2 State Preserved?
<>...</> <>{[...]}</> yes (in any level)
<><>...</></> <>...</> no
[...] [[...]] no
[<>...</>]* [...] no
[<>...</>]* <>...</> no
[<>...</>]* <>[...]</> no
[<>...</>]* [[...]] yes
[&lt;&gt;...&gt;]* &lt;&gt;&lt;&gt;...&gt;&gt; yes
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active May 13, 2024 12:21
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@laryn
laryn / replace_smartobject_image.js
Last active May 13, 2024 12:20
Photoshop script to replace a smart object within a PSD with selected image(s) and save result as a JPG. (Transformations to the smart object will be applied to new images).
// Replace SmartObject’s Content and Save as JPG
// 2017, use it at your own risk
// Via @Circle B: https://graphicdesign.stackexchange.com/questions/92796/replacing-a-smart-object-in-bulk-with-photoshops-variable-data-or-scripts/93359
// JPG code from here: https://forums.adobe.com/thread/737789
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
var theName = myDocument.name.match(/(.*)\.[^\.]+$/)[1];
var thePath = myDocument.path;
@vdelacou
vdelacou / .eslintignore
Last active May 13, 2024 12:19
React Vite Typescript Eslint
vite.config.ts
src/vite-env.d.ts
dist
@cdseoo
cdseoo / emeditor.key
Created May 19, 2023 00:17
emeditor v22 lifetime key
DEMZF-UCKEE-HB222-DJDDH-594U5
DMAZF-UCKEE-A6222-8CADP-HQZ7H
DPAZF-UCKEE-FH222-ET546-DLRGT
DRNZF-UCKEE-UK222-RWNLU-XVZH7
DSBZF-UCKEE-BF222-K24JB-S9JLC
DSHZF-UCKEE-D3222-NMB93-UKSQF
DTHZF-UCKEE-BW222-Q2BKZ-NXPU8
DVAZF-UCKEE-J7222-5UHCT-QSRFE
DVEZF-UCKEE-PR222-ZAPFE-4C49Q
@K-ways
K-ways / CH376S_UART_One.ino
Created November 17, 2016 07:14
CH376S USB Chip with UART Communication.
// This is the clear code for CH376S UART communication.
#include <SoftwareSerial.h>
byte USB_Byte; //used to store data coming from the USB stick
int LED = 13; //the LED is connected to digital pin 13
int timeOut = 2000; //TimeOut is 2 seconds. This is the amount of time you wish to wait for a response from the CH376S module.
SoftwareSerial USB(10, 11); // Digital pin 10 on Arduino (RX) connects to TXD on the CH376S module
// Digital pin 11 on Arduino (TX) connects to RXD on the CH376S module
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Unittest with DocTests."""
import doctest
import unittest
@titenkov
titenkov / vim-visual-blocks.md
Last active May 13, 2024 12:17
Use Vim visual blocks during interactive git rebase

Sometimes, when rebasing interactively with git, we need to squash a sequence of commits in a branch.

For example, we need to transform this:

pick 0253dc894f bumped
pick 5a1e86933c remove dependency
pick bffoffb395 memberships rpc resource
pick 222fabf5e0 rpc membership service
pick 726a2f9a10 remove crypto logic
@0xdevalias
0xdevalias / reverse-engineering-webpack-apps.md
Last active May 13, 2024 12:15
Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue/Angular) apps
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}